using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using Bussiness.Config;     
using Bussiness.Entity;
namespace Bussiness.ManagerBase
{
                

     public abstract class PT_PTMV_HistoryManagerBase
    {
        public PT_PTMV_HistoryManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity Insert(PT_PTMV_HistoryEntity obj)
        { 
            return (PT_PTMV_HistoryEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity Update(PT_PTMV_HistoryEntity obj)
        { 
            return (PT_PTMV_HistoryEntity)Adapter.Update(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo dieu kien trong object
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity UpdateWithCondition(PT_PTMV_HistoryEntity obj,PT_PTMV_HistoryEntity objCond)
        { 
            return (PT_PTMV_HistoryEntity)Adapter.UpdateWithCondition(obj,objCond);             
        }
 
 
        public PT_PTMV_HistoryEntity Delete(PT_PTMV_HistoryEntity obj)
        { 
            return (PT_PTMV_HistoryEntity)Adapter.Delete(obj);             
        }
 
 
        public PT_PTMV_HistoryEntity DeleteWithCondition(PT_PTMV_HistoryEntity objCond)
        { 
            return (PT_PTMV_HistoryEntity)Adapter.DeleteWithCondition(objCond);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteByCreatedBy (PT_PTMV_HistoryEntity obj)
        { 
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedBy 
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteByCreatedBy (string CreatedBy )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.CreatedBy = CreatedBy;  
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteByCreatedDate (PT_PTMV_HistoryEntity obj)
        { 
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedDate 
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteByCreatedDate (DateTime CreatedDate )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.CreatedDate = CreatedDate;  
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteByIsDeleted (PT_PTMV_HistoryEntity obj)
        { 
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"IsDeleted");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IsDeleted 
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteByIsDeleted (bool IsDeleted )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.IsDeleted = IsDeleted;  
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"IsDeleted");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien STOCK_OUT_DAT duoc set trong object
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteBySTOCK_OUT_DAT (PT_PTMV_HistoryEntity obj)
        { 
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"STOCK_OUT_DAT");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien STOCK_OUT_DAT 
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteBySTOCK_OUT_DAT (string STOCK_OUT_DAT )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.STOCK_OUT_DAT = STOCK_OUT_DAT;  
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"STOCK_OUT_DAT");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteByUpdatedBy (PT_PTMV_HistoryEntity obj)
        { 
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedBy 
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteByUpdatedBy (string UpdatedBy )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.UpdatedBy = UpdatedBy;  
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteByUpdatedDate (PT_PTMV_HistoryEntity obj)
        { 
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedDate 
        /// </summary>
        /// <returns>PT_PTMV_HistoryEntity</returns>
        public PT_PTMV_HistoryEntity DeleteByUpdatedDate (DateTime UpdatedDate )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.UpdatedDate = UpdatedDate;  
            return (PT_PTMV_HistoryEntity)Adapter.DeleteByField(obj,"UpdatedDate");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public PT_PTMV_HistoryEntity Select(PT_PTMV_HistoryEntity obj)
        { 
            return (PT_PTMV_HistoryEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(PT_PTMV_HistoryEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(PT_PTMV_HistoryEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new PT_PTMV_HistoryEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new PT_PTMV_HistoryEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<PT_PTMV_HistoryEntity> SelectAllLST()
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new PT_PTMV_HistoryEntity()),new PT_PTMV_HistoryEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<PT_PTMV_HistoryEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new PT_PTMV_HistoryEntity(),option),new PT_PTMV_HistoryEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (PT_PTMV_HistoryEntity obj)
        { 
            return Adapter.SelectByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CreatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectByCreatedByLST (PT_PTMV_HistoryEntity obj)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectByCreatedByLST (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CreatedBy",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (string CreatedBy )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.CreatedBy = CreatedBy;  
            return Adapter.SelectByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (string CreatedBy, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.CreatedBy = CreatedBy;  
            return Adapter.SelectByField(obj,"CreatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectByCreatedByLST (string CreatedBy )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.CreatedBy = CreatedBy;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectByCreatedByLST (string CreatedBy, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.CreatedBy = CreatedBy;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (PT_PTMV_HistoryEntity obj)
        { 
            return Adapter.SelectByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CreatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectByCreatedDateLST (PT_PTMV_HistoryEntity obj)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectByCreatedDateLST (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CreatedDate",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (DateTime CreatedDate )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.CreatedDate = CreatedDate;  
            return Adapter.SelectByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (DateTime CreatedDate, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.CreatedDate = CreatedDate;  
            return Adapter.SelectByField(obj,"CreatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectByCreatedDateLST (DateTime CreatedDate )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.CreatedDate = CreatedDate;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectByCreatedDateLST (DateTime CreatedDate, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.CreatedDate = CreatedDate;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsDeleted (PT_PTMV_HistoryEntity obj)
        { 
            return Adapter.SelectByField(obj,"IsDeleted");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsDeleted (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"IsDeleted",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectByIsDeletedLST (PT_PTMV_HistoryEntity obj)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsDeleted"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectByIsDeletedLST (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"IsDeleted",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsDeleted (bool IsDeleted )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.IsDeleted = IsDeleted;  
            return Adapter.SelectByField(obj,"IsDeleted");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIsDeleted (bool IsDeleted, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.IsDeleted = IsDeleted;  
            return Adapter.SelectByField(obj,"IsDeleted",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectByIsDeletedLST (bool IsDeleted )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.IsDeleted = IsDeleted;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsDeleted"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IsDeleted duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectByIsDeletedLST (bool IsDeleted, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.IsDeleted = IsDeleted;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IsDeleted",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien STOCK_OUT_DAT duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySTOCK_OUT_DAT (PT_PTMV_HistoryEntity obj)
        { 
            return Adapter.SelectByField(obj,"STOCK_OUT_DAT");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien STOCK_OUT_DAT duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySTOCK_OUT_DAT (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"STOCK_OUT_DAT",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien STOCK_OUT_DAT duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectBySTOCK_OUT_DATLST (PT_PTMV_HistoryEntity obj)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"STOCK_OUT_DAT"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien STOCK_OUT_DAT duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectBySTOCK_OUT_DATLST (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"STOCK_OUT_DAT",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien STOCK_OUT_DAT 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySTOCK_OUT_DAT (string STOCK_OUT_DAT )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.STOCK_OUT_DAT = STOCK_OUT_DAT;  
            return Adapter.SelectByField(obj,"STOCK_OUT_DAT");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien STOCK_OUT_DAT duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySTOCK_OUT_DAT (string STOCK_OUT_DAT, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.STOCK_OUT_DAT = STOCK_OUT_DAT;  
            return Adapter.SelectByField(obj,"STOCK_OUT_DAT",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien STOCK_OUT_DAT 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectBySTOCK_OUT_DATLST (string STOCK_OUT_DAT )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.STOCK_OUT_DAT = STOCK_OUT_DAT;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"STOCK_OUT_DAT"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien STOCK_OUT_DAT duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectBySTOCK_OUT_DATLST (string STOCK_OUT_DAT, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.STOCK_OUT_DAT = STOCK_OUT_DAT;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"STOCK_OUT_DAT",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (PT_PTMV_HistoryEntity obj)
        { 
            return Adapter.SelectByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UpdatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectByUpdatedByLST (PT_PTMV_HistoryEntity obj)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectByUpdatedByLST (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UpdatedBy",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (string UpdatedBy )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.UpdatedBy = UpdatedBy;  
            return Adapter.SelectByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (string UpdatedBy, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.UpdatedBy = UpdatedBy;  
            return Adapter.SelectByField(obj,"UpdatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectByUpdatedByLST (string UpdatedBy )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.UpdatedBy = UpdatedBy;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectByUpdatedByLST (string UpdatedBy, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.UpdatedBy = UpdatedBy;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (PT_PTMV_HistoryEntity obj)
        { 
            return Adapter.SelectByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UpdatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectByUpdatedDateLST (PT_PTMV_HistoryEntity obj)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectByUpdatedDateLST (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UpdatedDate",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (DateTime UpdatedDate )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.UpdatedDate = UpdatedDate;  
            return Adapter.SelectByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (DateTime UpdatedDate, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.UpdatedDate = UpdatedDate;  
            return Adapter.SelectByField(obj,"UpdatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectByUpdatedDateLST (DateTime UpdatedDate )
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.UpdatedDate = UpdatedDate;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate"),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_PTMV_HistoryEntity> SelectByUpdatedDateLST (DateTime UpdatedDate, SelectOptions option)
        { 
            PT_PTMV_HistoryEntity obj = new PT_PTMV_HistoryEntity();
            obj.UpdatedDate = UpdatedDate;  
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate",option),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectWithConditionLST (PT_PTMV_HistoryEntity obj)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new PT_PTMV_HistoryEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<PT_PTMV_HistoryEntity></returns>
        public List<PT_PTMV_HistoryEntity> SelectWithConditionLST (PT_PTMV_HistoryEntity obj,SelectOptions option)
        { 
            return  (List<PT_PTMV_HistoryEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new PT_PTMV_HistoryEntity());
        }

}
}
